<template>
  <div :class="$style.root">
    <el-form :inline="true" :model="formQuery" label-position="right">
      <el-row>
        <el-col :span="6">
          <el-form-item label="顶级渠道" :label-width="labelWidth">
            <el-select clearable v-model="formQuery.topChannelCode" placeholder="请选择" style="width: 90%" filterable>
              <el-option v-for="item in topChannelList" :key="item.id" :label="item.name" :value="item.id" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="公司编码" :label-width="labelWidth">
            <el-input v-model="formQuery.companyCode" placeholder="请输入" style="width: 90%" clearable />
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="商品编码" :label-width="labelWidth">
            <el-input v-model="formQuery.goodsCode" placeholder="请输入" style="width: 90%" clearable />
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="最低毛利" :label-width="labelWidth">
            <el-input-number v-model="formQuery.startMinGross" controls-position="right" :step="0.1" style="margin-right:4%;width: 43%" />
            <el-input-number v-model="formQuery.endMinGross" controls-position="right" :step="0.1" style="width: 43%" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="6">
          <el-form-item label="商品类型" :label-width="labelWidth">
            <el-select clearable v-model="formQuery.goodsType" placeholder="请选择" style="width: 90%" filterable>
              <el-option v-for="item in goodsTypeList" :key="item.id" :label="item.name" :value="item.id" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="自动调价" :label-width="labelWidth">
            <el-select clearable v-model="formQuery.autoPrice" placeholder="请选择" style="width: 90%" filterable>
              <el-option label="是" value="Y" />
              <el-option label="否" value="N" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-button @click="onQuery" type="primary" :loading="querying">查询</el-button>
          <el-button @click="reset" type="info">重置</el-button>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<style lang="scss" module>
@import './index.module.scss';
</style>

<script>
import Index from './index';
export default Index;
</script>
